home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / BSN122SR.ZIP / src / bison-1.22 / makefile < prev    next >
Makefile  |  1993-11-27  |  6KB  |  190 lines

  1. # Makefile generated by "configure.bat"
  2. all.dos : bison 
  3. # Makefile for bison
  4. # Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
  5. # This file is part of Bison, the GNU Compiler Compiler.
  6. # Bison is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. # Bison is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with Bison; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = .
  21. VPATH = .
  22.  
  23. CC = gcc
  24. INSTALL = 
  25. INSTALL_PROGRAM = 
  26. INSTALL_DATA = 
  27. MAKEINFO = makeinfo
  28.  
  29. # Things you might add to DEFS:
  30. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  31. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  32. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  33. # -DHAVE_STRERROR    If you have strerror function.
  34. DEFS = -DHAVE_STRERROR
  35.  
  36. CFLAGS = -g
  37. LDFLAGS = -g
  38.  
  39. LIBS = 
  40.  
  41. # Some System V machines do not come with libPW.  If this is true, use
  42. # the GNU alloca.o here.
  43. ALLOCA = 
  44.  
  45. prefix = /usr/local
  46. exec_prefix = $(prefix)
  47.  
  48. # where the installed binary goes
  49. bindir = $(exec_prefix)/bin
  50.  
  51. # where the parsers go
  52. datadir = $(prefix)/lib
  53.  
  54. # where the info files go
  55. infodir = $(prefix)/info
  56.  
  57. # where manual pages go and what their extensions should be
  58. mandir = $(prefix)/man/man$(manext)
  59. manext = 1
  60.  
  61. #### End of system configuration section. ####
  62.  
  63. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  64.     REFERENCES bison.1 bison.rnh configure.bat \
  65.     bison.simple bison.hairy \
  66.     LR0.c allocate.c closure.c conflicts.c derives.c \
  67.     files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  68.     output.c print.c reader.c reduce.c symtab.c version.c \
  69.     warshall.c files.h gram.h lex.h machine.h new.h state.h \
  70.     symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  71.     vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  72.     getopt.c getopt.h getopt1.c alloca.c mkinstalldirs
  73.  
  74.  
  75. SHELL = /bin/sh
  76.  
  77. # This rule allows us to supply the necessary -D options
  78. # in addition to whatever the user asks for.
  79. .c.o:
  80.     $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  81.  
  82. # names of parser files
  83. PFILE = bison.simple
  84. PFILE1 = bison.hairy
  85.  
  86. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  87.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  88.  
  89. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  90.       getargs.o gram.o lalr.o lex.o                    \
  91.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  92.       warshall.o version.o                        \
  93.       getopt.o getopt1.o $(ALLOCA)
  94.  
  95. all: bison bison.info bison.s1
  96.  
  97. Makefile: Makefile.in config.status
  98.     ./config.status
  99.  
  100. config.status: configure
  101.     ./config.status --recheck
  102.  
  103. configure: configure.in
  104.     cd $(srcdir); autoconf
  105.  
  106. # Copy bison.simple, inserting directory name into the #line commands.
  107. bison.s1: bison.simple
  108.     -rm -f bison.s1
  109.     sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  110.  
  111. clean:
  112.     rm -f *.o core bison bison.s1
  113.  
  114. mostlyclean: clean
  115.  
  116. distclean: clean
  117.     rm -f Makefile config.status
  118.  
  119. realclean: distclean
  120.     rm -f TAGS *.info*
  121.  
  122. # Most of these deps are in case using RCS.
  123. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  124.     $(INSTALL_PROGRAM) bison $(bindir)/bison
  125.     $(INSTALL_DATA) ./bison.s1 $(datadir)/$(PFILE)
  126.     $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  127.     -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1) 
  128.     -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  129.     -chmod a+r $(mandir)/bison.$(manext)
  130.     cd $(srcdir); for f in bison.info*; \
  131.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  132.  
  133. # Make sure all installation directories, e.g. $(bindir) actually exist by
  134. # making them if necessary.
  135. installdirs:
  136.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  137.  
  138. uninstall:
  139.     rm -f $(bindir)/bison
  140.     -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  141.     rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  142.  
  143. bison: $(OBJECTS)
  144.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  145.  
  146. dist: bison.info
  147.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  148.     -rm -rf `cat .fname`
  149.     mkdir `cat .fname`
  150.     dst=`cat .fname`; for f in $(DISTFILES); do \
  151.        ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \
  152.     done
  153.     tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  154.     -rm -rf `cat .fname` .fname
  155.  
  156. bison.info: bison.texinfo
  157.     $(MAKEINFO) $(srcdir)/bison.texinfo
  158.  
  159. TAGS: *.c *.h
  160.     etags *.c *.h
  161.  
  162. # This file is different to pass the parser file names to the compiler.
  163. files.o: files.c
  164.     $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  165.        $(srcdir)/files.c $(OUTPUT_OPTION)
  166.  
  167. LR0.o: system.h machine.h new.h gram.h state.h
  168. closure.o: system.h machine.h new.h gram.h
  169. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  170. derives.o: system.h new.h types.h gram.h
  171. files.o: system.h files.h new.h gram.h
  172. getargs.o: system.h files.h
  173. lalr.o: system.h machine.h types.h state.h new.h gram.h
  174. lex.o: system.h files.h symtab.h lex.h
  175. main.o: system.h machine.h
  176. nullable.o: system.h types.h gram.h new.h
  177. output.o: system.h machine.h new.h files.h gram.h state.h
  178. print.o: system.h machine.h new.h files.h gram.h state.h
  179. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  180. reduce.o: system.h machine.h files.h new.h gram.h
  181. symtab.o: system.h new.h symtab.h gram.h
  182. warshall.o: system.h machine.h
  183.  
  184. # Prevent GNU make v3 from overflowing arg limit on SysV.
  185. .NOEXPORT:
  186.